﻿<script type="text/template" id="doctype-form-template">
    <div id="doctype-form-error" class="error"></div>
    <form id="doctype-form" onsubmit="return false;">
        <ul class="idata-form">
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageDocTypeName %>    
                </span>
                <span>
                    <input type="text" name="Name" id="Name" required value="<%= model.Name %>"/>
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageDocTypeBook %>                        
                </span>
                <span>
                    <select name="BookId" id="BookId" style="width: 354px;" class="form-select-BookId">
                        <%= VH.MakeOption(VOFFICE.ManageDocType.BookList, model.BookId) %>
                    </select>
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageDocTypeCommon %>                        
                </span>
                <span>
                    <input type="checkbox"  <%= model.IsCommon == true ? 'checked="checked"' : '' %> name = "IsCommon" id="IsCommon" class="form-cbx-IsCommon" />
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageDocTypeActive %>  
                </span>
                <span>
                    <input type="checkbox"  <%= model.IsActive == true ? 'checked="checked"' : '' %> name = "IsActive" id="IsActive" />
                </span>
            </li>
            <li>
                <span class="idata-form-title">
                    <%= jsResources.lang.ManageDocTypeDescription %>    
                </span>
                <span>
                    <textarea name="Description" id="Description" value="<%= model.Description %>"></textarea>
                </span>
            </li>
        </ul>
        <div class="clear"></div>
        <center>
            <input type="submit" value = "<%= model.id == 0 ? jsResources.lang.Create : jsResources.lang.Update %>" id="submit-doctype"/>
        </center>
    </form>

</script>
<script type="text/template" id="list-doctype-item-template">
    <td class="text-center">
        <%= model.Order %>
    </td>
    <td>
        <%= model.Name %>
    </td>
    <td>
        <%= model.Description %>
    </td>
    <td>
        <%= model.BookName %>
    </td>
    <td>
        <input type="checkbox"  <%= model.IsCommon == true ? 'checked="checked"' : '' %> name = "IsCommon" class="cbxIsCommon" />
    </td>
    <td>
         <input type="checkbox"  <%= model.IsActive == true ? 'checked="checked"' : '' %> name = "IsActive" class="cbxIsActive" />
    </td>
    <td>
        <%= dateFormat( model.UpdatedAt, jsResources.lang.DateFormat) %>
    </td>
    <td>
        <a href="#" class="grid-update-doctype"><%= jsResources.lang.GridEdit %></a>    
    </td>
    <td>
         <a href="#" class="grid-delete-doctype"><%= jsResources.lang.GridDelete %></a>               
    </td>
</script>
